Embedding Banners
You can embed a Nudge Banner widget in your application. This widget can then be populated with UI that you create on the Nudge Dashboard.
- XML
- Compose
<com.nudgenow.nudgecorev2.experiences.appcomponent.core.NudgeAppComponent
android:layout_width="match_parent"
android:layout_gravity="center_horizontal"
android:background="@color/white"
android:tag="{YOUR_VIEW_TAG}"
android:layout_height="wrap_content"/>
AndroidView(
factory = { ctx ->
val appComponent = NudgeAppComponent(ctx).apply {
tag = "your_banner_tag" // Use the passed parameter as the tag
}
appComponent
}
)
warning
Make sure you add a view tag